<?php
function getTitle($tableN,$contId) //获取信息标题
    {
        $titles="";
        $tableName="";
        switch($tableN)
        {
            case "1000":
                    $tableName="news";
                    break;
                case "1002":
                    $tableName="celebrity";
                    break;
                case "1003":
                    $tableName="PhotoGroup";
                    break;
                case "1004":
                    $tableName="magzine";
                    break;
                case "1005":
                    $tableName="music";
                    break;
                case "1001"://视频
                case "1006"://视频组
                    $tableName="video";
                    break;
        }
        if($contId>0){
            $content=@Doctrine_Core::getTable($tableName)->find($contId);
            switch($tableN)
            {

                case "1002"://百科
                    $titles=$content->getName();
                    break;
                case "1004":
                    $titles="";
                    $tableName="magzine";
                    break;
                case "1005":
                    $tableName="music";
                    $titles="";
                    break;
                case "1000"://新闻
                case "1001"://视频
                case "1003": //美图
                case "1006"://视频组
                $titles=$content->getTitle();
                break;
            }
        }
    return $titles;
    }